Implementing ridge regression via gradient descent

Screenshot taken from Coursera